<?php
    if(!empty($this->listGoods)) {
        foreach ($this->listGoods as $goodsValue) { ?>
    <div class="index-goods-item">
        <div class="product-block">
            <div class="image">
                <div class="product-img">
                    <a href="<?php echo $this->url('shop-goods', ['id' => $goodsValue[0]->getGoodsId()]); ?>" title="<?php echo $this->escapeHtml($goodsValue['goodsName']); ?>"><img src="" data-original="<?php echo $this->shopHelper()->baseGoodsImagePath($goodsValue['goodsThumbnailImage']); ?>" class="lazy img-responsive"></a>
                </div>
            </div>
            <div class="product-info">
                <div class="info">
                    <h5 class="name"><a href="<?php echo $this->url('shop-goods', ['id' => $goodsValue[0]->getGoodsId()]); ?>" title="<?php echo $this->escapeHtml($goodsValue['goodsName']); ?>"><?php echo $this->escapeHtml($goodsValue['goodsName']); ?></a></h5>
                    <div class="price">
                        <span class="price-new"><?php echo (isset($goodsValue['goodsGroupPrice']) && $goodsValue['goodsGroupPrice'] > 0) ? $this->frontCurrency($goodsValue['goodsGroupPrice']) : $this->frontCurrency($goodsValue['goodsPrice']); ?></span>
                    </div>
                </div>
                <div id="opacity-cart" class="cart">
                    <div class="cart-style">
                        <button onclick="addCart(<?php echo $goodsValue[0]->getGoodsId(); ?>);" class="add-to-cart cart-1-<?php echo $goodsValue[0]->getGoodsId(); ?>" type="button"><i class="iconfont"></i> <span><?php echo $this->translate('加入购物车'); ?></span></button>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php } } ?>
